<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="statics.SoptVars"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=us&key=<%=SoptVars.GOOGLEMAPSAPIKEY%>"></script>
    <script type="text/javascript">
    var map;
    function mapsLoaded(){
		map = new Map(document.getElementById("map"));
        map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13);
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
   	}
   	function del(){
   		map.GUnload();
   	}
   	
  
   	
   // Call this function when the page has been loaded
      function initialize() {
       

        var searchControl = new google.search.SearchControl();
        searchControl.addSearcher(new google.search.WebSearch());
        searchControl.addSearcher(new google.search.NewsSearch());
        searchControl.draw(document.getElementById("searchcontrol"));
      }
      /// google.setOnLoadCallback(initialize); 온로드시 호출되는 것
</script>
</head>
<body>
	<div id="map" style="width: 500px; height: 400px"></div>
	<input type="button" onclick="mapsLoaded();" value='gen'/>
	<input type="button" onclick="delMaps();" value='del'/>
</body>
</html>